Skip to content

New tutorial: two-scale mechanics problem on a 3D notch component #653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

IshaanDesai
Copy link
Member

@IshaanDesai IshaanDesai commented Jun 16, 2025

This PR adds a new multiscale mechanics tutorial which couples a CalculiX simulation to many FANS simulations via preCICE and the Micro Manager. Details of the case are in the README. This tutorial uses features of the CalculiX adapter from precice/calculix-adapter#135

Checklist:

  • I added a summary of any user-facing changes (compared to the last release) in the changelog-entries/<PRnumber>.md.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@IshaanDesai IshaanDesai self-assigned this Jun 16, 2025
@IshaanDesai IshaanDesai requested a review from MakisH June 17, 2025 11:49
<write-data name="strains4to6" mesh="notch-mesh" />
</participant>

<participant name="Micro-Manager">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently not yet clear in our tutorial guidelines, but the idea was to name participants named on physical domain, not on solver. Is there a particular reason to call this Micro-Manager and not Macro? I see that we have the same in https://precice.org/tutorials-two-scale-heat-conduction.html

Further naming conventions that seem to be violated:

  • micro-fans instead of notch-fans (or, instead, Notch instead of Micro)
  • Data, mesh, and participant names in the config should start with an uppercase and be separated by dashes.

The config visualization would need to be regenerated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not look at the guidelines. Will go through them and align the contribution accordingly.

Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with my first round, I will have another look and try after these comments are implemented.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we extract the mesh and further long, generated parts from the rest of the input file, to keep the file short?
In the perpendicular flap, we use *INCLUDE=... statement:
https://github.com/precice/tutorials/blob/develop/perpendicular-flap/solid-calculix/flap.inp

Unless this is really meant to only be generated from FreeCAD and modified there, in which case we need some instructions in the README.md (or even a script) to be able to maintain it.

I would suggest splitting the file and documenting some instructions or hints in the README.md.

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

ccx_preCICE -i notch -precice-participant Notch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ccx_preCICE -i notch -precice-participant Notch
ccx_preCICE -i notch -precice-participant Notch
close_log


## Available solvers and dependencies

* The macro notch problem is solved using [CalculiX](https://www.calculix.de/), so it required the [CalculiX adapter](https://github.com/precice/calculix-adapter).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The macro notch problem is solved using [CalculiX](https://www.calculix.de/), so it required the [CalculiX adapter](https://github.com/precice/calculix-adapter).
* The macro notch problem is solved using [CalculiX](https://www.calculix.de/), so it required the [CalculiX adapter](https://precice.org/adapter-calculix-overview.html).


* The macro notch problem is solved using [CalculiX](https://www.calculix.de/), so it required the [CalculiX adapter](https://github.com/precice/calculix-adapter).
* The micro problem is solved using [FANS](https://github.com/DataAnalyticsEngineering/FANS/tree/develop). FANS needs to be compiled in a Python-wrapped library form, check the [documentation](https://github.com/DataAnalyticsEngineering/FANS/blob/develop/pyfans/README.md) on how to do this.
* The [Micro Manager](https://precice.org/tooling-micro-manager-installation.html) controls all micro-simulations and facilitates coupling via preCICE. Use the [develop](https://github.com/precice/micro-manager/tree/develop) branch of the Micro Manager.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some future-proof information here? Does it depend on a specific feature that we wait to be released? When will we be able to remove this statement?


The `num_procs` needs to fit the decomposition specified in the `micro-manager-config.json` (default is serial). See the documentation on [how to set domain decomposition](https://precice.org/tooling-micro-manager-configuration.html#domain-decomposition) in the Micro Manager configuration.

**NOTE**: When running `micro-fans`, even though the case setup and involved physics is simple, each micro simulation is a FANS simulation with a mesh of 32x32x32 nodes, which usually has a moderately high computation time. If the Micro Manager is run in serial, the total runtime is approximately 30 minutes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a proper note alert here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants